home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: Does Borland C++ 5.0 still work with normal C???
- Date: 25 Feb 1996 19:56:37 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Feb25125637@qcd.lanl.gov>
- References: <n4mwd.33.000A228B@magg.net> <4gdkv3$q8a@druid.borland.com>
- <4ggsie$1fg@dopey.magg.net> <4gqdf7$jfo@redstone.interpath.net>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: softbase@mercury.interpath.net's message of 25 Feb 1996 19:31:51 GMT
-
- In article <4gqdf7$jfo@redstone.interpath.net>
- softbase@mercury.interpath.net (Scott McMahan - Softbase Systems) writes:
-
- SMSS: Dennis Hawkins (n4mwd@magg.net) wrote:
- SMSS:
- SMSS: : printf("%ld\n", (long) sizeof 'a');
- SMSS:
- SMSS: : and produce an EXE that generates '2' for the output.
- SMSS:
- SMSS: How do you get two out of this? A char is 1, and casting that to a long
- SMSS: is still 1, only it takes up more bytes. How can this evaluate to 2?
- SMSS: sizeof char being 1 is kinda hard-wired into the language.
-
- Except, in C, 'a' is not a char, but an int.
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-